<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>{:config('WEB_SITE_TITLE')}</title>
<link href="__STATIC__/bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="__PUBLIC__/home/css/default.css" rel="stylesheet">
<link href="__PUBLIC__/home/css/twothink.css" rel="stylesheet">

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="__STATIC__/bootstrap/js/html5shiv.js"></script>
<![endif]-->
{block name="style"}{/block}
<script type="text/javascript" src="__STATIC__/js/jquery.js"></script>
<script type="text/javascript" src="__STATIC__/bootstrap/js/bootstrap.min.js"></script>
<!--<![endif]-->
<!-- 页面header钩子，一般用于加载插件CSS文件和代码 -->
{:hook('pageHeader')}
</head>
<body>
	<!-- 头部 -->
	<!-- 导航条
	================================================== -->
	<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
		<div class="container">

			<div class="navbar-header">
				<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
					<span class="sr-only">TwoThink</span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
					<span class="icon-bar"></span>
				</button>
				<a class="navbar-brand" href="{:url('index/index')}">TwoThink</a>
			</div>

			<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
				<ul class="nav navbar-nav">
					{think:nav name="nav"/}
					{eq name="nav.pid" value="0"}
					<li>
						<a href="{$nav.url|get_nav_url}" target="{eq name='nav.target' value='1'}_blank{else/}_self{/eq}">{$nav.title}</a>
					</li>
					{/eq}
					{/think:nav}
				</ul>

				<ul class="nav navbar-nav navbar-right">
					{if condition="is_login()"}
					<li class="dropdown">
						<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{:get_username()} <span class="caret"></span></a>
						<ul class="dropdown-menu">
							<li><a href="{:url('user/user/profile')}">修改密码</a></li>
							<li><a href="{:url('user/login/logout')}">退出</a></li>
						</ul>
					</li>
					{else/}
					<li><a href="{:url('user/login/index')}">登录</a></li>
					<li><a href="{:url('user/user/register')}" style="padding-left:0;padding-right:0">注册</a></li>
					{/if}
				</ul>
			</div>

		</div>

	</nav>

	<!-- /头部 -->
	
	<!-- 主体 -->
	{block name="header"}{/block}
	<div id="main-container" class="container">
		<div class="row">
			{block name="side"}
			<!-- 左侧 nav
			================================================== -->
				<div class="col-xs-3 bs-docs-sidebar">
					{block name="publish"}{/block}
					<ul class="nav nav-pills nav-stacked">
					   {:widget('Category/lists', array($category['id'], request()->action() == 'index'))}
					</ul>
				</div>
			{/block}
			{block name="body"}{/block}
		</div>
	</div>

	<script type="text/javascript">
	    $(function(){
	        $(window).resize(function(){
	            $("#main-container").css("min-height", $(window).height() - 343);
	        }).resize();
	    })
	</script>
	<!-- /主体 -->

	<!-- 底部 -->
	
    <!-- 底部
    ================================================== -->
    <footer class="footer">
      <div class="container">
          <p> 本站由 <strong><a href="http://www.twothink.cn" target="_blank">TwoThink</a></strong> 强力驱动</p>
      </div>
    </footer>
	{block name="script"}{/block} <!-- 用于加载js代码 -->
	<!-- 页面footer钩子，一般用于加载插件JS文件和JS代码 -->
	{:hook('pageFooter', 'widget')}
	<div class="hidden"><!-- 用于加载统计代码等隐藏元素 -->
		{block name="hidden"}{/block}
	</div>

	<!-- /底部 -->
</body>
</html>
